Many processors include multiple processing cores. In order to take advantage of the multiple processing cores of a processor, programmers write multi-threaded applications in which multiple threads of an application are distributed across the processing cores of the processor and executed substantially simultaneously by the cores of the processor. The resources of the processor (e.g., cache memory) are typically shared between the threads of the application. Accordingly, a first thread of the application may attempt to use the same resource as a second thread of the application. In order to maintain consistency of the shared resources, only one thread is allowed to use a shared resource at any given time. All other threads are blocked from using the shared resource and must wait for their turn to use the shared resource. As a result, deadlocks and/or performance bottlenecks may occur because only a subset of the threads can execute in parallel while the other threads wait for the shared resources to become free.
Like reference numerals refer to corresponding parts throughout the drawings.